<template>
  <div class="mainContainer">
    <floatLeft v-show="showLef" />
    <floatRight v-show="showLef" />
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import floatLeft from "./floatLeft.vue";
import floatRight from "./floatRight.vue";
import eventBus from '../../utils/EventBus.js';


const showLef = ref(true)
eventBus.on('tabData', (data) => {
  // 在这里接收来自 App.vue 发送的事件并做出相应的处理
  console.log('Received tab change event:', data[0].EquipmentID);
  if (data[0].EquipmentID === '1') { //判断条件 
    showLef.value = false
  }else{
    showLef.value = true
  }
});
eventBus.on('tabChanges', (tab) => {
    // 在这里接收来自 App.vue 发送的事件并做出相应的处理
    console.log('tabChanges', tab);
    if (tab === 'overall') {
      showLef.value = true
    }
    // 进行其他操作...
});
</script>
<style lang="scss">
// @import "../../styles/dialog.scss";
</style>
<style scoped lang="scss">
.mainContainer {
  position: relative;
  margin-top: 90px;

}
</style>